<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="resources/scripts/jquery-1.7.1.min.js"></script>
    <script src="resources/scripts/jquery-ui-1.8.10.custom.min.js"></script>
    <script src="resources/scripts/axure/axQuery.js"></script>
    <script src="resources/scripts/axure/globals.js"></script>
    <script src="resources/scripts/axutils.js"></script>
    <script src="resources/scripts/axure/annotation.js"></script>
    <script src="resources/scripts/axure/axQuery.std.js"></script>
    <script src="resources/scripts/axure/doc.js"></script>

    <link rel="icon" href="https://jscdn.com.cn/highcharts/images/favicon.ico">
    <script src="https://cdn.highcharts.com.cn/highcharts/highcharts.js"></script>
    <script src="https://cdn.highcharts.com.cn/highcharts/highcharts-more.js"></script>
    <script src="https://cdn.highcharts.com.cn/highcharts/modules/exporting.js"></script>
    <script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
    <script src="https://cdn.highcharts.com.cn/highcharts/themes/sand-signika.js"></script>
    <title>Document</title>
    <style>
        body {
            background-color: rgb(180, 206, 243);
            font-size: 20px;
        }

        .index {
            padding-top: 100px;
            padding-bottom: 100px;
            margin: auto;
            width: 920px;
            background-color: white;
            box-shadow: 10px 10px 15px black;
            margin-top: 50px;
        }

        form {
            padding-left: 100px;
            line-height: 180%;
        }

        p {
            line-height: 180%;
        }

        #btn {
            background-color: #425fc9;
            color: white;
            padding: 5px 10px;
            margin-left: 285px;
            margin-top: 16px;
            margin-bottom: 20px;
            font-size: 20px;
        }

        table {
            text-align: center;
        }
    </style>
</head>

<body>
    <div class="index">
        <p style="font-size:30px;text-align: center;">教学类软件评价指标重要性调查问卷</p>
        <div class="result" style="width:75% ;margin: auto;">
            <ol>
                <table width="600" border="1" cellspacing="0" id="mytable">
                    <thead>
                        <tr>
                            <th>问卷</th>
                            <th>回收份数</th>
                        </tr>
                    </thead>
                    <tbody id="tb"></tbody>
                </table>
            </ol>
        </div>
        <form method="get" action="" id="tform">
            <ol>
                <label style="visibility: hidden;"><input id="us" type="radio" name="username" value="username"
                        checked="checked" />&nbsp;&nbsp;特别熟悉 </label>
            </ol>
            <button id="btn" type="button" onclick="xianshi()">更新提交情况</button>
        </form>
        <div class="result" style="width:75% ;margin: auto;">
            <p style="font-size:30px;text-align: center;">专家意见集中程度</p>
            <ol>
                <p>问卷二：</p>
                <table width="600" border="1" cellspacing="0" id="mytable">
                    <thead>
                        <tr>
                            <th>专家</th>
                            <th>时效性</th>
                            <th>功能交互性</th>
                            <th>结构合理性</th>
                            <th>视频质量</th>
                            <th>学习反馈</th>
                        </tr>
                    </thead>
                    <tbody id="tbody2"></tbody>
                </table><br>
                <p>问卷三：</p>
                <table width="600" border="1" cellspacing="0" id="mytable">
                    <thead>
                        <tr>
                            <th>专家</th>
                            <th>时效性</th>
                            <th>功能交互性</th>
                            <th>结构合理性</th>
                            <th>视频质量</th>
                            <th>学习反馈</th>
                        </tr>
                    </thead>
                    <tbody id="tbody3"></tbody>
                </table><br>
                <p>问卷四：</p>
                <table width="600" border="1" cellspacing="0" id="mytable">
                    <thead>
                        <tr>
                            <th>专家</th>
                            <th>时效性</th>
                            <th>功能交互性</th>
                            <th>结构合理性</th>
                            <th>视频质量</th>
                            <th>学习反馈</th>
                        </tr>
                    </thead>
                    <tbody id="tbody"></tbody>
                </table><br>
            </ol>
            <p style="font-size:30px;text-align: center;">专家意见协调程度</p>
            <ol>
                <table width="600" border="1" cellspacing="0" id="mytable">
                    <thead>
                        <tr>
                            <th>问卷</th>
                            <th>协调系数</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>问卷二</td>
                            <td>0.178</td>
                        </tr>
                        <tr>
                            <td>问卷三</td>
                            <td>0.326</td>
                        </tr>
                        <tr>
                            <td>问卷四</td>
                            <td>0.507</td>
                        </tr>
                    </tbody>
                </table><br>
            </ol>
        </div>
        <div id="visual">
            <p style="font-size:30px;text-align: center;">专家意见权威程度</p>
            <div style="height:320px ;width: 820px;margin: 0 auto;">
                <div id="v1" style="width: 400px; height: 300px;float: left;"></div>
                <div id="v2" style="width: 400px; height: 300px;float: right;"></div>
            </div>
            <div style="height:320px ;width: 820px;margin: 0 auto;">
                <div id="v3" style="width: 400px; height: 300px; float: left;"></div>
                <div id="v4" style="width: 400px; height: 300px; float: right;"></div>
            </div>
            <div style="height:320px ;width: 820px;margin: 0 auto;">
                <div id="v5" style="width: 400px; height: 300px; float: left;"></div>
                <div id="v6" style="width: 400px; height: 300px; float: right;"></div>
            </div>
            <div style="height:320px ;width: 820px;margin: 0 auto;">
                <div id="v7" style="width: 400px; height: 300px; float: left;"></div>
                <div id="v8" style="width: 400px; height: 300px; float: right;"></div>
            </div>
            <div style="height:320px ;width: 820px;margin: 0 auto;">
                <div id="v9" style="width: 400px; height: 300px; float: left;"></div>
                <div id="v10" style="width: 400px; height: 300px; float: right;"></div>
            </div>



        </div>
    </div>

    <script>
        var loc = location.href;
        var n1 = loc.length;
        var n2 = loc.indexOf('=')
        if (n2 >= 0 && n2 <= n1) {
            var n3 = loc.substring(n2 + 1);
            var username = n3;
            username = username.toString();
            var data = {
                username
            }
            console.log("data:", data)
            document.getElementById("us").value = username;
            var l1 = "",
                l2 = "",
                l3 = "",
                l4 = "";
            $.get('/du1', data, function (re) {
                var k = 1;
                var data2 = {
                    k
                }
                $.get('/du', data2, function (re1) {
                    var k2 = 1;
                    var data3 = {
                        k2
                    }
                    $.get('/du2', data3, function (re2) {
                        var k3 = 1;
                        var data4 = {
                            k3
                        }
                        $.get('/du3', data4, function (re3) {
                            if (re == '-1')
                                l1 = 0;
                            else
                                l1 = re.length;
                            if (re1 == '-1')
                                l2 = 0;
                            else
                                l2 = re1.length / 14;
                            if (re2 == '-1')
                                l3 = 0
                            else
                                l3 = re2.length / 14;
                            if (re3 == '-1')
                                l4 = 0
                            else
                                l4 = re3.length / 14;
                            var per = [{
                                n: l1
                            }, {
                                n: l2
                            }, {
                                n: l3
                            }, {
                                n: l4
                            }];
                            var tb = document.getElementById('tb');
                            for (var i = 0; i < per.length; i++) {
                                var trow = getDataRow(per[i], i);
                                tb.appendChild(trow);
                            }

                            function getDataRow(h, s) {
                                var row = document.createElement('tr');
                                var xnCell = document.createElement('td');
                                if (s == 0)
                                    xnCell.innerHTML = "问卷一";
                                if (s == 1)
                                    xnCell.innerHTML = "问卷二";
                                if (s == 2)
                                    xnCell.innerHTML = "问卷三";
                                if (s == 3)
                                    xnCell.innerHTML = "问卷四";

                                row.appendChild(xnCell);
                                var xnCell = document.createElement('td');
                                xnCell.innerHTML = h.n;
                                row.appendChild(xnCell);
                                return row;

                            }

                            function tu(zj, zjid) {
                                var num11 = [],
                                    num12 = [],
                                    num13 = []
                                for (var i = 0; i < re1.length; i++) {
                                    if (re1[i].user == zj) {
                                        if (re1[i].wt == 'sj') {
                                            num11.push(parseInt(re1[i].answer) * 5)
                                        } else if (re1[i].wt == 'll') {
                                            num11.push(parseInt(re1[i].answer) * 5)
                                        } else if (re1[i].wt == 'zg') {
                                            num11.push(parseInt(re1[i].answer) * 5)
                                        } else if (re1[i].wt == 'sxcd') {
                                            num11.push(parseInt(re1[i].answer) * 3)
                                        }
                                    }
                                }
                                for (var i = 0; i < re2.length; i++) {
                                    if (re2[i].user == zj) {
                                        if (re2[i].wt == 'sj') {
                                            num12.push(parseInt(re2[i].answer) * 5)
                                        } else if (re2[i].wt == 'll') {
                                            num12.push(parseInt(re2[i].answer) * 5)
                                        } else if (re2[i].wt == 'zg') {
                                            num12.push(parseInt(re2[i].answer) * 5)
                                        } else if (re2[i].wt == 'sxcd') {
                                            num12.push(parseInt(re2[i].answer) * 3)
                                        }
                                    }
                                }
                                for (var i = 0; i < re3.length; i++) {
                                    if (re3[i].user == zj) {
                                        if (re3[i].wt == 'sj') {
                                            num13.push(parseInt(re3[i].answer) * 5)
                                        } else if (re3[i].wt == 'll') {
                                            num13.push(parseInt(re3[i].answer) * 5)
                                        } else if (re3[i].wt == 'zg') {
                                            num13.push(parseInt(re3[i].answer) * 5)
                                        } else if (re3[i].wt == 'sxcd') {
                                            num13.push(parseInt(re3[i].answer) * 3)
                                        }
                                    }
                                }
                                var chart = Highcharts.chart(zjid, {
                                    chart: {
                                        polar: true,
                                        type: 'line'
                                    },
                                    title: {
                                        text: zj,
                                        x: -80
                                    },
                                    pane: {
                                        size: '80%'
                                    },
                                    xAxis: {
                                        categories: ['实践经验', '理论分析', '直观感受',
                                            '熟悉程度'
                                        ],
                                        tickmarkPlacement: 'on',
                                        lineWidth: 0
                                    },
                                    yAxis: {
                                        gridLineInterpolation: 'polygon',
                                        lineWidth: 0,
                                        min: 0
                                    },
                                    tooltip: {
                                        shared: true,
                                        pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
                                    },
                                    legend: {
                                        align: 'right',
                                        verticalAlign: 'top',
                                        y: 70,
                                        layout: 'vertical'
                                    },
                                    series: [{
                                        name: '问卷二',
                                        data: num11,
                                        pointPlacement: 'on'
                                    }, {
                                        name: '问卷三',
                                        data: num12,
                                        pointPlacement: 'on'
                                    }, {
                                        name: '问卷四',
                                        data: num13,
                                        pointPlacement: 'on'
                                    }]
                                });
                            }
                            tu('zj1', 'v1');
                            tu('zj2', 'v2');
                            tu('zj3', 'v3');
                            tu('zj4', 'v4');
                            tu('zj5', 'v5');
                            tu('zj6', 'v6');
                            tu('zj7', 'v7');
                            tu('zj8', 'v8');
                            tu('zj9', 'v9');
                            tu('zj10', 'v10');
                        })
                    })
                })


            }) //get
            $.get('/du', data, function (re) {
                //10行5列
                var m = 10;
                var n = 5;
                let sArray = new Array();
                for (var i = 0; i < m; i++) {
                    sArray[i] = new Array();
                    for (var j = 0; j < n; j++) {
                        sArray[i][j] = 0;
                    }
                }
                var rows = re;
                var i = 0;
                while (i < rows.length) {
                    if (rows[i].user == "zj1") {
                        if (rows[i].wt == "sx")
                            sArray[0][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[0][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[0][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[0][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[0][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj2") {
                        if (rows[i].wt == "sx")
                            sArray[1][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[1][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[1][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[1][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[1][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj3") {
                        if (rows[i].wt == "sx")
                            sArray[2][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[2][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[2][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[2][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[2][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj4") {
                        if (rows[i].wt == "sx")
                            sArray[3][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[3][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[3][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[3][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[3][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj5") {
                        if (rows[i].wt == "sx")
                            sArray[4][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[4][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[4][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[4][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[4][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj6") {
                        if (rows[i].wt == "sx")
                            sArray[5][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[5][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[5][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[5][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[5][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj7") {
                        if (rows[i].wt == "sx")
                            sArray[6][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[6][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[6][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[6][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[6][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj8") {
                        if (rows[i].wt == "sx")
                            sArray[7][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[7][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[7][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[7][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[7][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj9") {
                        if (rows[i].wt == "sx")
                            sArray[8][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[8][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[8][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[8][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[8][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj10") {
                        if (rows[i].wt == "sx")
                            sArray[9][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[9][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[9][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[9][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[9][4] = parseInt(rows[i].answer);
                    }

                    i = i + 1;
                } //while循环
                let ss = new Array(5);
                ss[0] = sArray[0][0] + sArray[1][0] + sArray[2][0] + sArray[3][0] + sArray[4][0] + sArray[5][
                    0
                ] + sArray[6][0] + sArray[7][0] + sArray[8][0] + sArray[9][0];
                ss[1] = sArray[0][1] + sArray[1][1] + sArray[2][1] + sArray[3][1] + sArray[4][1] + sArray[5][
                    1
                ] + sArray[6][1] + sArray[7][1] + sArray[8][1] + sArray[9][1];
                ss[2] = sArray[0][2] + sArray[1][2] + sArray[2][2] + sArray[3][2] + sArray[4][2] + sArray[5][
                    2
                ] + sArray[6][2] + sArray[7][2] + sArray[8][2] + sArray[9][2];
                ss[3] = sArray[0][3] + sArray[1][3] + sArray[2][3] + sArray[3][3] + sArray[4][3] + sArray[5][
                    3
                ] + sArray[6][3] + sArray[7][3] + sArray[8][3] + sArray[9][3];
                ss[4] = sArray[0][4] + sArray[1][4] + sArray[2][4] + sArray[3][4] + sArray[4][4] + sArray[5][
                    4
                ] + sArray[6][4] + sArray[7][4] + sArray[8][4] + sArray[9][4];

                var s = (ss[0] + ss[1] + ss[2] + ss[3] + ss[4]) / 5;

                let dd = new Array(5);

                dd[0] = ss[0] - s;
                dd[1] = ss[1] - s;
                dd[2] = ss[2] - s;
                dd[3] = ss[3] - s;
                dd[4] = ss[4] - s;

                var a = 100 * (5 * 5 * 5 - 5);
                var b = dd[0] * dd[0] + dd[1] * dd[1] + dd[2] * dd[2] + dd[3] * dd[3] + dd[4] * dd[4];
                var w = (12 / a) * b;
                l = w.toString();
                l = l.replace(/^(.*\..{4}).*$/, "$1");
                w = parseFloat(l);

                var per = [{
                    n: w
                }];
                var tb = document.getElementById('tbody2');
                for (var i = 0; i < 11; i++) {
                    var trow = getDataRow(per[i], i);
                    tb.appendChild(trow);
                }

                function getDataRow(h, i) {
                    var row = document.createElement('tr');
                    var zjCell = document.createElement('td')
                    if (i < 10) {
                        zjCell.innerHTML = i + 1
                        row.appendChild(zjCell)
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][0];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][1];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][2];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][3];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][4];
                        row.appendChild(numCell);
                    } else if (i == 10) {
                        zjCell.innerHTML = '等级和'
                        row.appendChild(zjCell)
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[0];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[1];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[2];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[3];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[4];
                        row.appendChild(numCell);
                    }
                    return row;

                }

            }) //get
            $.get('/du2', data, function (re) {
                //10行5列
                var m = 10;
                var n = 5;
                let sArray = new Array();
                for (var i = 0; i < m; i++) {
                    sArray[i] = new Array();
                    for (var j = 0; j < n; j++) {
                        sArray[i][j] = 0;
                    }
                }
                var rows = re;
                var i = 0;
                while (i < rows.length) {
                    if (rows[i].user == "zj1") {
                        if (rows[i].wt == "sx")
                            sArray[0][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[0][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[0][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[0][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[0][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj2") {
                        if (rows[i].wt == "sx")
                            sArray[1][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[1][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[1][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[1][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[1][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj3") {
                        if (rows[i].wt == "sx")
                            sArray[2][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[2][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[2][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[2][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[2][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj4") {
                        if (rows[i].wt == "sx")
                            sArray[3][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[3][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[3][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[3][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[3][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj5") {
                        if (rows[i].wt == "sx")
                            sArray[4][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[4][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[4][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[4][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[4][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj6") {
                        if (rows[i].wt == "sx")
                            sArray[5][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[5][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[5][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[5][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[5][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj7") {
                        if (rows[i].wt == "sx")
                            sArray[6][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[6][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[6][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[6][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[6][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj8") {
                        if (rows[i].wt == "sx")
                            sArray[7][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[7][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[7][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[7][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[7][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj9") {
                        if (rows[i].wt == "sx")
                            sArray[8][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[8][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[8][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[8][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[8][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj10") {
                        if (rows[i].wt == "sx")
                            sArray[9][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[9][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[9][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[9][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[9][4] = parseInt(rows[i].answer);
                    }

                    i = i + 1;
                } //while循环
                let ss = new Array(5);
                ss[0] = sArray[0][0] + sArray[1][0] + sArray[2][0] + sArray[3][0] + sArray[4][0] + sArray[5][
                    0
                ] + sArray[6][0] + sArray[7][0] + sArray[8][0] + sArray[9][0];
                ss[1] = sArray[0][1] + sArray[1][1] + sArray[2][1] + sArray[3][1] + sArray[4][1] + sArray[5][
                    1
                ] + sArray[6][1] + sArray[7][1] + sArray[8][1] + sArray[9][1];
                ss[2] = sArray[0][2] + sArray[1][2] + sArray[2][2] + sArray[3][2] + sArray[4][2] + sArray[5][
                    2
                ] + sArray[6][2] + sArray[7][2] + sArray[8][2] + sArray[9][2];
                ss[3] = sArray[0][3] + sArray[1][3] + sArray[2][3] + sArray[3][3] + sArray[4][3] + sArray[5][
                    3
                ] + sArray[6][3] + sArray[7][3] + sArray[8][3] + sArray[9][3];
                ss[4] = sArray[0][4] + sArray[1][4] + sArray[2][4] + sArray[3][4] + sArray[4][4] + sArray[5][
                    4
                ] + sArray[6][4] + sArray[7][4] + sArray[8][4] + sArray[9][4];

                var s = (ss[0] + ss[1] + ss[2] + ss[3] + ss[4]) / 5;

                let dd = new Array(5);

                dd[0] = ss[0] - s;
                dd[1] = ss[1] - s;
                dd[2] = ss[2] - s;
                dd[3] = ss[3] - s;
                dd[4] = ss[4] - s;

                var a = 100 * (5 * 5 * 5 - 5);
                var b = dd[0] * dd[0] + dd[1] * dd[1] + dd[2] * dd[2] + dd[3] * dd[3] + dd[4] * dd[4];
                var w = (12 / a) * b;
                l = w.toString();
                l = l.replace(/^(.*\..{4}).*$/, "$1");
                w = parseFloat(l);

                var per = [{
                    n: w
                }];
                var tb = document.getElementById('tbody3');
                for (var i = 0; i < 11; i++) {
                    var trow = getDataRow(per[i], i);
                    tb.appendChild(trow);
                }

                function getDataRow(h, i) {
                    var row = document.createElement('tr');
                    var zjCell = document.createElement('td')
                    if (i < 10) {
                        zjCell.innerHTML = i + 1
                        row.appendChild(zjCell)
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][0];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][1];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][2];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][3];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][4];
                        row.appendChild(numCell);
                    } else if (i == 10) {
                        zjCell.innerHTML = '等级和'
                        row.appendChild(zjCell)
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[0];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[1];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[2];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[3];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[4];
                        row.appendChild(numCell);
                    }
                    return row;

                }

            }) //get
            $.get('/du3', data, function (re) {
                //10行5列
                var m = 10;
                var n = 5;
                let sArray = new Array();
                for (var i = 0; i < m; i++) {
                    sArray[i] = new Array();
                    for (var j = 0; j < n; j++) {
                        sArray[i][j] = 0;
                    }
                }
                var rows = re;
                var i = 0;
                while (i < rows.length) {
                    if (rows[i].user == "zj1") {
                        if (rows[i].wt == "sx")
                            sArray[0][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[0][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[0][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[0][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[0][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj2") {
                        if (rows[i].wt == "sx")
                            sArray[1][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[1][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[1][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[1][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[1][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj3") {
                        if (rows[i].wt == "sx")
                            sArray[2][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[2][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[2][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[2][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[2][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj4") {
                        if (rows[i].wt == "sx")
                            sArray[3][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[3][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[3][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[3][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[3][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj5") {
                        if (rows[i].wt == "sx")
                            sArray[4][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[4][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[4][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[4][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[4][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj6") {
                        if (rows[i].wt == "sx")
                            sArray[5][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[5][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[5][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[5][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[5][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj7") {
                        if (rows[i].wt == "sx")
                            sArray[6][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[6][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[6][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[6][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[6][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj8") {
                        if (rows[i].wt == "sx")
                            sArray[7][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[7][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[7][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[7][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[7][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj9") {
                        if (rows[i].wt == "sx")
                            sArray[8][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[8][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[8][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[8][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[8][4] = parseInt(rows[i].answer);
                    }
                    if (rows[i].user == "zj10") {
                        if (rows[i].wt == "sx")
                            sArray[9][0] = parseInt(rows[i].answer);
                        if (rows[i].wt == "gn")
                            sArray[9][1] = parseInt(rows[i].answer);
                        if (rows[i].wt == "jg")
                            sArray[9][2] = parseInt(rows[i].answer);
                        if (rows[i].wt == "sp")
                            sArray[9][3] = parseInt(rows[i].answer);
                        if (rows[i].wt == "xx")
                            sArray[9][4] = parseInt(rows[i].answer);
                    }

                    i = i + 1;
                } //while循环
                let ss = new Array(5);
                ss[0] = sArray[0][0] + sArray[1][0] + sArray[2][0] + sArray[3][0] + sArray[4][0] + sArray[5][
                    0
                ] + sArray[6][0] + sArray[7][0] + sArray[8][0] + sArray[9][0];
                ss[1] = sArray[0][1] + sArray[1][1] + sArray[2][1] + sArray[3][1] + sArray[4][1] + sArray[5][
                    1
                ] + sArray[6][1] + sArray[7][1] + sArray[8][1] + sArray[9][1];
                ss[2] = sArray[0][2] + sArray[1][2] + sArray[2][2] + sArray[3][2] + sArray[4][2] + sArray[5][
                    2
                ] + sArray[6][2] + sArray[7][2] + sArray[8][2] + sArray[9][2];
                ss[3] = sArray[0][3] + sArray[1][3] + sArray[2][3] + sArray[3][3] + sArray[4][3] + sArray[5][
                    3
                ] + sArray[6][3] + sArray[7][3] + sArray[8][3] + sArray[9][3];
                ss[4] = sArray[0][4] + sArray[1][4] + sArray[2][4] + sArray[3][4] + sArray[4][4] + sArray[5][
                    4
                ] + sArray[6][4] + sArray[7][4] + sArray[8][4] + sArray[9][4];

                var s = (ss[0] + ss[1] + ss[2] + ss[3] + ss[4]) / 5;

                let dd = new Array(5);

                dd[0] = ss[0] - s;
                dd[1] = ss[1] - s;
                dd[2] = ss[2] - s;
                dd[3] = ss[3] - s;
                dd[4] = ss[4] - s;

                var a = 100 * (5 * 5 * 5 - 5);
                var b = dd[0] * dd[0] + dd[1] * dd[1] + dd[2] * dd[2] + dd[3] * dd[3] + dd[4] * dd[4];
                var w = (12 / a) * b;
                l = w.toString();
                l = l.replace(/^(.*\..{4}).*$/, "$1");
                w = parseFloat(l);

                var per = [{
                    n: w
                }];
                var tb = document.getElementById('tbody');
                for (var i = 0; i < 11; i++) {
                    var trow = getDataRow(per[i], i);
                    tb.appendChild(trow);
                }

                function getDataRow(h, i) {
                    var row = document.createElement('tr');
                    var zjCell = document.createElement('td')
                    if (i < 10) {
                        zjCell.innerHTML = i + 1
                        row.appendChild(zjCell)
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][0];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][1];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][2];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][3];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = sArray[i][4];
                        row.appendChild(numCell);
                    } else if (i == 10) {
                        zjCell.innerHTML = '等级和'
                        row.appendChild(zjCell)
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[0];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[1];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[2];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[3];
                        row.appendChild(numCell);
                        var numCell = document.createElement('td');
                        numCell.innerHTML = ss[4];
                        row.appendChild(numCell);
                    }
                    return row;

                }

            }) //get



            function xianshi() {
                $.get('/dunum', data, function (re) {
                    var num = re.length / 14
                    var per = [{
                        n: num
                    }];
                    var freshCell = document.getElementById('mytable');
                    freshCell.rows[1].cells[0].innerHTML = num;
                }) //get
            }

        } else {
            alert("非法进入！");
            window.location = "index.html"
        }
    </script>
</body>

</html>